import axios from 'axios'
import fileHttp from './file-http'
import interceptor from './interceptor'
import { initConfig } from './config'

[axios, fileHttp].map(item => {
  initConfig(item)
  interceptor(item)
})

axios.install = (Vue) => {
  Vue.prototype.$axios = axios
  Vue.prototype.$fileHttp = fileHttp
}

export default axios
